<?php

class Tb_Ratio_Sources extends Models {

    private $_name = "ratio_sources";
    const UPDATED = 1;
    /*
     * Get sources
     */
    public function get($params = array()) {
        $query = 'SELECT * FROM ' . $this->_name.'
                 WHERE status != '.self::UPDATED;
        $sources = $this->fetchArray($query);
        return $sources;
    }
    public function updateStatus($id) {
        $query = 'UPDATE '.$this->_name.'
                  SET status = '.self::UPDATED.'
                  WHERE id = '.$id;
        return $this->query($query);
    }
}